#ifndef __Skygen_SphericalMapSkyboxGenerator_h__
#define __Skygen_SphericalMapSkyboxGenerator_h__

#include "Skygen/SkyboxGenerator.h"
#include "Skygen/ImprovedPerlinNoise.h"

#include "GfxDriver/Texture.h"

namespace Orca {

	class TSphericalMapSkyboxGenerator : public ISkyboxGenerator {

	public:
		TSphericalMapSkyboxGenerator();
		virtual ~TSphericalMapSkyboxGenerator();

		virtual Str getVertexProgramFilename();
		virtual Str getFragmentProgramFilename();
		virtual vec4 computeSkyboxColor(const vec3 &dir, int size);
		virtual void updateShaderConstants(Shader *shader);
		virtual void step(float dt);

	private:
		TImprovedPerlinNoise<float> mIPN;

		uint32	mCloudTexSize;

		float	*mCPhi;
		float	*mSPhi;

		float	*mCTheta;
		float	*mSTheta;

		float	mAccumTime;

		Texture2d *mNoiseTex;
	};
}

#endif	// __Skygen_SphericalMapSkyboxGenerator_h__